package com.wc.AlgoOJ_train.train1.c6.A614;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/10 23:29
 * @description 空心三角形
 * http://43.138.190.70:8888/p/A614
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            char c = sc.next().charAt(0);
            if (c=='@'){
                return;
            }
            int h = sc.nextInt();
            paint(c, h);
        }
    }

    static void paint(char c, int h) {
        int left = h;
        int right = h;
        StringBuffer ans = new StringBuffer();
        for (int i = 1; i <= h; i++) {
            StringBuffer row = new StringBuffer();
            for (int j = 1; j < left; j++) {
                row.append(' ');
            }
            for (int j = left; j <= right; j++) {
                if (j == left || j == right || i == h) {
                    row.append(c);
                } else {
                    row.append(' ');
                }
            }
            ans.append(row);
            ans.append('\n');
            left--;
            right++;
        }
        System.out.println(ans);
    }
}
